﻿@{
    Layout = string.Format("~/Views/Shared/EditorTemplates/_EditorTemplateLayout.cshtml");

    object modelValue = ViewData.ModelMetadata.Model;
    object value;

    if (modelValue is byte[])
    {
        value = Convert.ToBase64String((byte[])modelValue);
    }
    else
    {
        value = modelValue;
    }
}

@Html.Hidden("", value, ViewData)